<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div class="mc-l">
            <!--左侧导航---{-->
            <div id="navPanelContainer">
                <div class="system-logo cd"></div>
                <!--管理员信息---{-->
                <#include "../adminInfo.html">
                    <!--管理员信息---}-->
                    <div class="nav-wrap">
                        <#include "left.html">
                    </div>
            </div>
            <!--左侧导航---}-->
        </div>
        <div class="mc-m">
            <div class="navToggle"></div>
        </div>
        <div class="mc-r">
            <!--顶部导航---{-->
            <#include "../topNav.html">
                <!--顶部导航---}-->

                <!--面包屑导航---{-->
                <#assign moduleName="易极付任务" >
                    <#include "banner.html">
                        <!--面包屑导航---}-->

                        <!--工具栏--{-->
                        <div id="toolbar" class="clearfix">

                            <div class="toolbor-module search">
                                <input type="text" name="borrowid" id="borrowid" value="请输入标ID" class="search-value">
                                <input type="text" name="period" id="period" value="请输入期数" class="search-value">
                                <#-- <input type="text" name="orderno" id="orderno" value="请输入订单号" class="search-value">-->
                                <div class="select-box" id="status">
                                    <div class="tag-select">请选择状态</div>
                                    <ul class="tag-options">
                                        <li data-value="" class="open-selected">请选择状态</li>
                                        <li data-value="1">成功</li>
                                        <li data-value="2">失败</li>
                                        <li data-value="0">未处理</li>
                                    </ul>
                                </div>
                                <div class="select-box" id="operatetype">
                                    <div class="tag-select">请选择交易类型</div>
                                    <ul class="tag-options">
                                        <li data-value="" class="open-selected">请选择交易类型</li>
                                        <li data-value="ADDBORROW">发标</li>
                                        <li data-value="ADDTENDER">投标</li>
                                        <li data-value="DOREPAY">还款</li>
                                        <li data-value="PREREPAY">提前还款</li>
                                        <li data-value="AUTOREPAY">自动还款</li>
                                        <li data-value="AUTOVERIFYFULLSUCCESS">后台满标复审通过</li>
                                        <li data-value="VERIFYBORROW">满标初审</li>
                                        <li data-value="FAIL">后台满标复审不通过</li>
                                        <li data-value="AUTOCANCEL">取消的标</li>
                                        <li data-value="AUTODOREPAYFORSECOND">秒标冻结</li>
                                        <li data-value="VERIFYFULLBORROW">前台满标处理</li>
                                        <li data-value="VERIFYRECHARGE">扣款审核</li>
                                        <li data-value="VERIFYVIPSUCCESS">vip审核通过</li>
                                        <li data-value="VERIFYVIPFAIL">vip审核不通过</li>
                                        <li data-value="WEBSITEPAYFORLATEBORROW">发标</li>
                                        <li data-value="NEWCASH">提现申请</li>
                                        <li data-value="VERIFYCASH">提现审核</li>
                                        <li data-value="CASHBACK">扣款</li>
                                        <li data-value="CANCELCASH">取消提现</li>
                                        <li data-value="FLOWREPAY">流标还款</li>
                                        <li data-value="CANCELBORROW">标初审取消</li>
                                    </ul>
                                </div>
                                <div class="select-box" id="service">
                                    <div class="tag-select">请选择服务类型</div>
                                    <ul class="tag-options">
                                        <li data-value="" class="open-selected">请选择服务类型</li>
                                        <li data-value="tradeCreatePoolTogether">接口创建交易号 </li>
                                        <li data-value="tradePayerApplyPoolTogether">费流转标投标</li>
                                        <li data-value="tradePayerQuitPoolTogether">撤回投标</li>
                                        <li data-value="tradePayPoolTogether">放款</li>
                                        <li data-value="tradeCreatePoolReverse">创建还款交易</li>
                                        <li data-value="tradePayPoolReverse">还款</li>
                                        <li data-value="tradeCreatePool">流转标创建交易号</li>
                                        <li data-value="tradePoolReceiveBorrow">流转标投标</li>
                                        <li data-value="tradeTransfer">转账</li>
                                        <li data-value="applyWithdraw">提现</li>
                                    </ul>
                                </div>
                                <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                            </div>
                        </div>
                        <!--工具栏--}-->

                        <div id="main" class="clearfix">
                            <form action="" method="post">
                                <table class="data-list">
                                    <tr class="header">
                                        <td>标ID</td>
                                        <td>期数</td>
                                        <td>金额</td>
                                        <td>服务类型</td>
                                        <td>操作类型</td>
                                        <td>状态</td>
                                        <td>订单号</td>
                                        <td>交易号</td>
                                        <td>子交易号</td>
                                        <td>备注</td>
                                    </tr>
                                    <#list list as item>
                                        <tr class="s">
                                            <td>
                                                <#if !(item.status??)||(item.status??&&item.status!='1')  >
                                                    <input  type="checkbox" name="ids" value=${item.id?c}>
                                                    <#else>
                                                        --
                                                </#if>
                                            </td>

                                            <!--  <td>${item.userid!'-'}</td>
                                             <td>${item.touserid!'-'}</td>-->
                                            <td>${item.borrowid!'-'}</td>
                                            <td>${item.period!'-'}</td>
                                            <td>${item.money!'-'}</td>
                                            <td>${item.service!'-'}</td>
                                            <td>${item.operatetype!'-'}</td>
                                            <td>
                                                <#if item.status??>
                                                    <#if item.status=='1'>
                                                        易极付处理成功
                                                        <#elseif item.status=='2'>
                                                            易极付处理失败
                                                            <#else>
                                                                易极付处理未处理
                                                    </#if>
                                                    <#else>
                                                        未处理
                                                </#if>
                                            </td>
                                            <td>${item.orderno!'-'}</td>
                                            <td>${item.tradeno!'-'}</td>
                                            <td>${item.subtradeno!'-'}</td>
                                            <td title="${item.errormsg!'-'}">点我查看</td>

                                        </tr>
                                    </#list>

                                </table>

                            </form>
                            <div class="fromDo">
                                <input type="button" value="全选"  onclick="allSelected()" >
                                <input type="button" value="取消全部"  onclick="cancelSelected()" >
                                <input id="send" type="button" value="重新触发" onclick="getValues();" >
                            </div>
                            <!--底部工具栏--{-->
                            <div id="bottomToolbar" class="clearfix">
                                <div class="other-tool">
                                    <dl class="refresh-data">
                                        <dt class="refresh-data-icon"></dt>
                                        <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                    </dl>
                                </div>

                                <!--翻页系统--{-->
                                <div class="container s_formPage">
                                    <#import "../../common/page.html" as pager>
                                        <@pager.pagination page=page url="/admin/borrow/schedule.html" map=param style="style1" />
                                </div>
                                <!--翻页系统--}-->
                            </div>
                            <!--底部工具栏--}-->
                            <script>
                                function sousuo(){
                                    var url='/admin/borrow/schedule.html?search=true';
                                    var sou='';
                                    var borrowid = $("#borrowid").val();
                                    if (borrowid!=""&&borrowid!=null&&borrowid!="undefine"&&borrowid!="请输入标ID"){
                                        sou += "&borrowid="+borrowid;
                                    }
                                    var period = $("#period").val();
                                    if (period!=""&&period!=null&&period!="undefine"&&period!="请输入期数"){
                                        sou += "&period="+period;
                                    }
                                    var orderno = $("#orderno").val();
                                    if (orderno!=""&&orderno!=null&&orderno!="undefine"&&orderno!="请输入订单号"){
                                        sou += "&orderno="+orderno;
                                    }
                                    var status = $("#status").find(".open-selected").attr("data-value");
                                    if (status!=""&&status!=null&&status!="undefine"){
                                        sou += "&status="+status;
                                    }
                                    var service = $("#service").find(".open-selected").attr("data-value");
                                    if (service!=""&&service!=null&&service!="undefine"){
                                        sou += "&service="+service;
                                    }
                                    var operatetype = $("#operatetype").find(".open-selected").attr("data-value");
                                    if (operatetype!=""&&operatetype!=null&&operatetype!="undefine"){
                                        sou += "&operatetype="+operatetype;
                                    }

                                    if (sou!=""){
                                        location.href=url+sou;
                                    }
                                }

                                function getValues(){
                                    var str='';
                                    $(":checkbox[name='ids'][checked]").each(function () {
                                        str = str+$(this).val()+","
                                    });
                                    location.href = "/admin/borrow/schedule.html?ids="+str;
                                }

                                function allSelected(){
                                    $("input:checkbox[name=ids]").each(function(){
                                        $(this).attr("checked", true);
                                    });
                                }

                                function cancelSelected(){
                                    $("input:checkbox[name=ids]").each(function(){
                                        $(this).removeAttr("checked");
                                    });
                                }
                            </script>
                        </div>
        </div>
    </div>
    <div class="mc-b"><#include "../foot.html"></div>
    <#include "../jsPage.html">
    </body>
</html>
